// dataAccess/db.ts
import mongoose, { ConnectOptions } from 'mongoose';

const mongoURI = 'mongodb://localhost:27017/mydatabase';

mongoose.connect(mongoURI, {
    useNewUrlParser: true,
    useUnifiedTopology: true,
} as ConnectOptions);

const db = mongoose.connection;
export default db; 